import http from "@/utils/http";

/** 数据字典API */
export class DataDictionaryApi {
   /** 添加字典 */
   static Create = (params: DataDictionary.Create) => http.post("/api/dataDictionary/create", params);

   /** 修改字典 */
   static Update = (params: DataDictionary.Update) => http.post("/api/dataDictionary/update", params);

   /** 查询字典 */
   static Search = (params?: DataDictionary.Search) => http.get<DataDictionary.Table[]>("/api/dataDictionary/search", params);

   /** 添加字典数据 */
   static ValueCreate = (params: DataDictionary.ValueCreate) => http.post("/api/dataDictionary/valueCreate", params);

   /** 删除字典数据 */
   static ValueDelete = (params: DataDictionary.ValueDelete) => http.post("/api/dataDictionary/valueDelete", params);

   /** 编辑字典数据 */
   static ValueUpdate = (params: DataDictionary.ValueUpdate) => http.post("/api/dataDictionary/valueUpdate", params);

   /** 查询字典数据 */
   static ValueSearch = (params: DataDictionary.ValueSearch) =>
      http.get<DataDictionary.Value[]>("/api/dataDictionary/valueSearch", params);
}
